home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3581 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: res.com!usenet
  2. From: danlynes@res.com
  3. Newsgroups: comp.lang.c
  4. Subject: Re: The size of a file
  5. Date: 30 Jan 1996 03:19:15 GMT
  6. Organization: RES Online
  7. Message-ID: <4ek2nj$1li@clare.res.com>
  8. References: <4ebc03$4gv@gate.compart.fi> <4edo88$4c7@news.xs4all.nl> <4ej9mr$fh5@noc.tor.hookup.net>
  9. Reply-To: danlynes@res.com
  10. NNTP-Posting-Host: di017.res.com
  11. X-Newsreader: IBM NewsReader/2 v1.2.5
  12.  
  13. In <4ej9mr$fh5@noc.tor.hookup.net>, Richard Steadman <rsteadma@mmltd.com> writes:
  14.  
  15. >>f=fopen()
  16. >>fseek(f,SEEK_END,0)
  17. >>ftell(f)
  18. >>fclose(f)
  19. >>
  20. >>done
  21. >>--
  22. >
  23. >But what if the file size doesn't fit in a long int (in DOS)? It
  24. >seems that a long int (which ftell() returns) only goes up to 2 meg.
  25.  
  26. Correction.  2Gb.  However, don't assume a long int is 32 bits.  Under
  27. a 64-bit RISC compiler, a long int is 64 bits, in which case, it can
  28. access up to a 4.2 * 10**18 byte file.  Which, should be enough to
  29. satisfy any byte hog.  At least in the next couple of years, anyways.
  30.  
  31. +------------------------------------------------------+
  32. !  OS/2         - The Champion of Operating Systems    !
  33. !  Enitharmon/2 - A Powerful BBS Package               !
  34. !  What a great pair!               danlynes@res.com   !
  35. !  www.res.com/~danlynes/index.html                    !
  36. !  www.res.com/~danlynes/Enitharmon!2/index.html       !
  37. !  The Enitharmon Beta project is now under way.       !
  38. !  To subscribe to the mailing list, send e-mail to    !
  39. !  danlynes@res.com or daniel.lynes@ideasnet.com       !
  40. +------------------------------------------------------+
  41.  
  42.